package cn.jcby.app.lebu.controller;


import cn.jcby.app.lebu.controller.res.ChargeLimitRes;
import cn.jcby.app.lebu.service.ChargeLimitService;
import cn.jcby.app.lebu.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



/**
 * 充值限制
 *
 * @author lht
 * @email 
 * @date 2023-12-07 15:13:35
 */
@RestController
@RequestMapping("/charge/limit")
@Api(tags="充值限制")
public class ChargeLimitController {
    @Autowired
    private ChargeLimitService chargeLimitService;

    @GetMapping("")
    @ApiOperation("详情")
    @ApiResponses({
         @ApiResponse(code = 200,message = "ok",response = ChargeLimitRes.class)
    })
    public Result info(){
        try {
            ChargeLimitRes chargeLimit = chargeLimitService.getInfoById();
            return Result.ok().put("data", chargeLimit);
        }catch (Exception e){
            e.printStackTrace();
             return Result.error(e.getMessage()) ;
        }
    }

}
